Kilim : a server framework with lightweight actors isolation types zero-copy messaging
نویسنده
چکیده
Kilim: A Server Framework with Lightweight Actors, Isolation Types & Zero-copy Messaging Sriram Srinivasan Internet services are implemented as hierarchical aggregates of communicating components: networks of data centers, networks of clusters in a data center, connected servers in a cluster, and multiple virtual machines on a server machine, each containing several operating systems processes. This dissertation argues for extending this structure to the intra-process level, with networks of communicating actors. An actor is a single-threaded state machine with a private heap and a thread of its own. It communicates with other actors using well-defined and explicit messaging protocols. Actors must be light enough to comfortably match the inherent concurrency in the problem space, and to exploit all available parallelism. Our aims are two-fold: (a) treat SMP systems as they really are: distributed systems with eventual consistency, and (b) recognize from the outset that a server is always part of a larger collection of communicating components, thus eliminating the mindset mismatch between concurrent programming and distributed programming. Although the actor paradigm is by no means new, our design points are informed by drawing parallels between the macro and micro levels. As with components in a distributed system, we expect that actors must be isolatable in a number of ways: memory isolation, fault isolation, upgrade isolation, and execution isolation. The application should be able to have a say in actor placement and scheduling, and actors must be easily monitorable. Our primary contribution is in showing that these requirements can be satisfied in a language and environment such as Java, without changes to the source language or to the virtual machine, and without leaving much of the idiomatic ambit of Java, with its mindset of pointers and mutable state. In other words, one does not have to move to a concurrency-oriented language or to an entirely immutable object paradigm. We demonstrate an open-source toolkit called Kilim that provides (a) ultra-lightweight actors (faster and lighter than extant environments such as Erlang), (b) a type system that guarantees memory isolation between threads by separating internal objects from exportable messages and by enforcing ownership and structural constraints on the latter (linearity and tree-structure, respectively) and, (c) a library with I/O support and customizable synchronization constructs and schedulers. We show that this solution is simpler to program than extant solutions, yet statically guaranteed to be free of low-level data races. It is also faster, more scalable and more steady (in increasing scale) in two industrial strength evaluations, interactive web services (comparing Kilim Web Server to Jetty) and databases (comparing Berkeley DB to a Kilim variant of it).
منابع مشابه
Kilim: Isolation-Typed Actors for Java
This paper describes Kilim, a framework that employs a combination of techniques to help create robust, massively concurrent systems in mainstream languages such as Java: (i) ultra-lightweight, cooperatively-scheduled threads (actors), (ii) a message-passing framework (no shared memory, no locks) and (iii) isolation-aware messaging. Isolation is achieved by controlling the shape and ownership o...
متن کاملPrism: Lightweight Filesystem Virtualization Via Selective Cloning
Suppose filesystems supported cloning of any subset of directories, even those containing gigabytes of data, almost instantaneously, while guaranteeing isolation between the original copy and the cloned copy. We show that this simple abstraction can greatly simplify many routine tasks, both for a single operating system and for clusters of similar virtual machines in a virtual server farm. In t...
متن کاملTowards an Empirical Study of Affine Types for Isolated Actors in Scala
LaCasa is a type system and programming model to enforce the object capability discipline in Scala, and to provide affine types. One important application of LaCasa’s type system is software isolation of concurrent processes. Isolation is important for several reasons including security and data-race freedom. Moreover, LaCasa’s affine references enable efficient, by-reference message passing wh...
متن کاملMonitoring Erlang/OTP Applications using Multiparty Session Types
The actor model has emerged as a programming paradigm particularly suited to programming concurrent and distributed systems. Programming languages based on the actor model consist of lightweight processes which do not communicate using shared memory, relying instead on explicit message passing. Consequently, programming languages built on the actor model avoid many of the pitfalls associated wi...
متن کاملLightweight Messages: True Zero-Copy Communication for Commodity Gigabit Ethernet
Gigabit Ethernet has become the main cluster interconnection for its low price and well backward compatibility. But the communication performance through Gigabit Ethernet is quite disappointing due to its performance discrepancies between the hardware and the communication software. To achieve over two-third physical bandwidth of a gigabit network interface, zero-copy protocol architecture is a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010